/**
 * Created by zhangsong on 2019/9/22.
 */
import { valueUniqueByKey } from '@/utils/utils';

const namespace = 'application-contractor';

const state = {
  saveLoading: false,
  listLoading: false,
  listData: [],
  saveSuccessModal: false, // 保存的模态框
  pdfUrl: '',
  pdfReview: [],
  pdfPreviewVisible: false, // pdf 预览是否可见
  pdfLoading: false,
  subcontractor: null,
  callMadal: false,
  groupList: [],
  mainContractorList: [],
  newlist: [],
  xslloading: false,
  defaultData: {},
};

const effects = {
  getContractorById: '',
  listByParam: '',
  modifyContractorById: '',
  saveContractor: '',
  removeById: '',
  previewPdf: '',
  handPDFModalCancel: '',
  getPreviewPdfById: '',
  approval: '',
  disapproval: '',
  reviewok: '',
  disreview: '',
  listSubcontractor: '',
  openCallModal: '',
  updateCallDate: '',
  getGroupList: '',
  creatGroupList: '',
  getMainContractor: '',
  createMainContractor: '',
  setList: '',
  modifycontralist: '',
  deletecontralist: '',
  modifygrouplist: '',
  deletegrouplist: '',
  sendEmail: '',
  getDefaultData: '',
};

const reducers = {
  setState: '',
};

const subscriptions = {};

valueUniqueByKey(effects);
valueUniqueByKey(reducers);
valueUniqueByKey(subscriptions);
export default {
  Namespace: namespace,
  State: state,
  Effects: effects,
  Reducers: reducers,
  Subscriptions: subscriptions,
};
